// scaup - Scala up!
// (c) 2008-2010, Normen Müller, normen.mueller@gmail.com  
// $Id: Timer.scala 80 2010-05-13 12:31:58Z normen.mueller $
package scaup.util

/** Implements a simple Timer.
 * 
 *  @author <a href="mailto:normen.mueller@googlemail.com">Normen M&#xFC;ller</a>
 *  @version 0.0.5
 */
class Timer {  
  private var myStart: Long = 0L
  
  private var myStop: Long = 0L
  
  def start = myStart = System.currentTimeMillis
  
  def stop = myStop = System.currentTimeMillis
  
  def elapsed = myStop - myStart
  
  // return seconds
  override def toString = "Elapsed time: " + (elapsed / 1000.0) + " sec"  
}
